Forms
This page describes how Pokémon forms are defined and how they work. This includes proper alternate forms (e.g. Deoxys), and also gender differences (e.g. Meowstic). Which Pokémon have forms Several Pokémon have multiple forms. These are: * Arceus * Basculin * Burmy/Wormadam * Castform * Cherrim (sprite difference only) * Darmanitan * Deerling/Sawsbuck * Deoxys * Genesect * Giratina * Keldeo * Kyurem * Landorus * Meloetta * Pichu (sprite difference only) * Rotom * Shaymin * Shellos/Gastrodon * Spinda (sprite difference only) * Thundurus * Tornadus * Unown * Any species which can Mega Evolve Defining an alternate form A Pokémon's forms are split into a base form and alternate forms. The base form is the one defined in the PBS file "pokemon.txt", while alternate forms are defined in the PBS file "pokemonforms.txt" and are modifications of the base form. The base form is number 0, and alternate forms are other numbers (1, 2, 3...). A variety of properties of a species can be modified by a form, such as type, abilities, moveset and held items. With a few exceptions (see below), anything defined about a species in the PBS file "pokemon.txt" can be modified for an alternate form of that species. pokemonforms.txt The PBS file "pokemonforms.txt" is laid out in nearly the same way as "pokemon.txt". The first main difference is in the section names (the lines that have square brackets around them to mark the beginning of a new species/form). In "pokemon.txt" these names are simply numbers (the ID of each species), whereas in "pokemonforms.txt" they are the internal name of a species, followed by a hyphen, followed by a form number: PICHU-1 UNOWN-16 SAWSBUCK-2 Since form 0 is the base form and is defined in "pokemon.txt", properties for form 0 of a species should not be defined in "pokemonforms.txt". The other difference is in which properties can be defined. All of this information is optional, even if is it required in "pokemon.txt". See Defining a species for a more detailed description of each property. In addition to the above, there are also some properties exclusive to alternate forms which can also be defined. These properties are all relevant to Mega Evolution forms. For completion's sake, the following properties cannot be defined for an alternate form, even though they can be defined in "pokemon.txt". The reasons for why they are disabled vary. Finally, a form's TM compatibility (i.e. information defined in the PBS file "tm.txt") cannot be added to "pokemonforms.txt". Instead, this information needs to be defined in the scripts. An example for you to copy is Wormadam: MultipleForms.register(:WORMADAM,{ "getMoveCompatibility"=>proc There are also some procedures used solely for Mega Evolutions, which are not listed here. Some species can change their forms, but only due to an outside influence (e.g. Deoxys changes when inspecting certain meteorites). These species do not need to use any of the procedures listed above. Some species change form in battle (e.g. Castform depending on the weather). The methods def pbCheckForm and def pbResetForm in script section PokeBattle_Battler contain code which handles this. Gender differences A number of species have gender differences. These are purely cosmetic, as only the sprite displayed for a Pokémon of that species can vary. If a species has non-cosmetic gender differences (e.g. Meowstic's moveset changes depending on its gender), then it should have two different forms to deal with this. The base form would have a form name of "Male" and the alternate form would be called "Female". It would also have a "getForm" prcedure (see above) which sets the form depending on the Pokémon's gender. Graphics and audio Sprites and icons Pokémon sprites are stored in the folder "Graphics/Battlers", and Pokémon icons are stored in the folder "Graphics/Icons". Whenever a Pokémon's sprite or icon is displayed, one of a variety of methods are called that decides which picture to use as that sprite/icon. These methods are in the script section PSystem_FileUtilities. These methods check several properties of the Pokémon they are finding a sprite/icon for, to make sure they return the most appropriate graphic. Pokémon sprites are stored in the folder "Graphics/Battlers". Their filenames are constructed from one or more elements in the following order: * XXX - the internal name of the species, or its ID number padded to 3 digits (always present) * f - if female * s - if shiny * b - if a back sprite * _1 - if an alternate form (the number is the form number) * _shadow - if a Shadow Pokémon Pokémon icons are stored in the folder "Graphics/Icons". Their filenames are named in the same way as sprites, except that they also have "icon" at the beginning (before the "XXX"). You do not need a file for each combination of the above elements. Essentials checks through each relevant permutation of elements in order until it finds the most appropriate one which exists as a file. For example, the back sprite of a female shiny East Sea Gastrodon would be "423fsb_1". However, Gastrodon does not have gender differences, so there would be no file with this name. Upon ignoring the gender, the new filename "423sb_1" is generated. This matches a file that exists, so that file is used as the sprite. There are plenty of examples in Essentials of how the sprites and icons are named. If you are unsure about file naming, look at those. Cries Pokémon cries are stored in the folder "Audio/SE/Cries". Their filenames include fewer elements than sprites/icons, but are still constructed in the same way: * XXX - the internal name of the species, or its ID number padded to 3 digits (always present) * "Cry" - this is text (always present) * _1 - if an alternate form (the number is the form number) For example, Sky Forme Shamin's cry has a filename of "492Cry_1". Important note! Files for form 0 should not have a form part of "_0" in them. Simply omit that element when naming the files. For example, Gastrodon would have front sprite files named "423.png" and "423_1.png" only (the default form West Sea and the alternate form East Sea respectively).